#!/bin/sh

set -e

ln -sf /usr/share/reader/reader.sh /usr/bin/reader

mkdir -p /var/reader
chmod 750 /var/reader

# Clear jetty cache.
rm -rf /var/reader/jetty

# Configure Reader service.
update-rc.d reader defaults 99

# Start Reader service.
invoke-rc.d reader start
